package cn.wx.jove.core.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import cn.wx.common.persistence.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import cn.wx.jove.core.service.StockdatafromtlService;
import cn.wx.jove.core.entity.Stockdatafromtl;
import cn.wx.common.persistence.web.ResponseData;
import cn.wx.jove.core.entity.qo.StockdatafromtlQ;
/**
 *   @description : Stockdatafromtl 控制器
 *   ---------------------------------
 *   @author  
 *   @since 2018-12-03
 */
@RestController
@RequestMapping("/stockdatafromtl")
public class StockdatafromtlController extends BaseController {

    @Autowired
    private StockdatafromtlService stockdatafromtlService;

    /**
     * @description : 通过条件获取Stockdatafromtl
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-03
     */
    @RequestMapping(value = "/query/unique", method = RequestMethod.POST)
    public ResponseData queryUnique(StockdatafromtlQ stockdatafromtlQ) throws Exception {
        return success(stockdatafromtlService.queryUnique(stockdatafromtlQ,Stockdatafromtl.class));
    }

    /**
     * @description : 通过条件获取Stockdatafromtl分页
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-03
     */
    @RequestMapping(value = "/query/page", method = RequestMethod.POST)
    public ResponseData queryPage(StockdatafromtlQ stockdatafromtlQ) throws Exception {
        return success(stockdatafromtlService.queryPage(stockdatafromtlQ));
    }

	/**
     * @description : 通过条件获取Stockdatafromtl
     * ---------------------------------
     * @author : 
     * @since : Create in 2018-12-03
     */
    @RequestMapping(value = "/query/list", method = RequestMethod.POST)
    public ResponseData queryList(StockdatafromtlQ stockdatafromtlQ) throws Exception {
        return success(stockdatafromtlService.queryList(stockdatafromtlQ));
    }
    
    /**
     * @description : 通过id删除Stockdatafromtl
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-03
     */
//    @RequestMapping(value = "/remove", method = RequestMethod.POST)
//    public ResponseData remove(Stockdatafromtl stockdatafromtl) throws Exception {
//        return success(stockdatafromtlService.remove(stockdatafromtl));
//    }

    /**
     * @description : 通过id更新Stockdatafromtl
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-03
     */
    @RequestMapping(value = "/modify", method = RequestMethod.POST)
    public ResponseData modify(Stockdatafromtl stockdatafromtl) throws Exception {
        return success(stockdatafromtlService.modify(stockdatafromtl));
    }
    
    /**
     * @description : 新增Stockdatafromtl
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-03
     */
     @RequestMapping(value = "/create", method = RequestMethod.POST)
     public ResponseData create(Stockdatafromtl stockdatafromtl) throws Exception {
        return success(stockdatafromtlService.create(stockdatafromtl));
     }
     
     /**
      * @description : 查询最大nid数据
      * ---------------------------------
      * @author :  
      * @since : Create in 2018-11-29
      */
     @RequestMapping(value = "/queryMax")
     public ResponseData queryMax() throws Exception {
        return success(stockdatafromtlService.queryMax());
     }
}